2 Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.dll"
\r
3 Begin VB.Form Principal
\r
4 AutoRedraw = -1 'True
\r
5 BorderStyle = 3 'Fixed Dialog
\r
11 MaxButton = 0 'False
\r
12 MinButton = 0 'False
\r
15 StartUpPosition = 3 'Windows Default
\r
16 Begin VB.CommandButton cmdNavegar
\r
25 Begin SHDocVwCtl.WebBrowser ie
\r
36 RegisterAsBrowser= 1
\r
37 RegisterAsDropTarget= 1
\r
38 AutoArrange = 0 'False
\r
39 NoClientEdge = 0 'False
\r
40 AlignLeft = 0 'False
\r
41 NoWebView = 0 'False
\r
42 HideFileNames = 0 'False
\r
43 SingleClick = 0 'False
\r
44 SingleSelection = 0 'False
\r
45 NoFolders = 0 'False
\r
46 Transparent = 0 'False
\r
47 ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
\r
50 Begin VB.TextBox txtSalido
\r
54 MultiLine = -1 'True
\r
55 ScrollBars = 2 'Vertical
\r
60 Begin VB.TextBox txtResultado
\r
64 MultiLine = -1 'True
\r
65 ScrollBars = 2 'Vertical
\r
70 Begin VB.TextBox txtAnalizar
\r
78 Attribute VB_Name = "Principal"
\r
79 Attribute VB_GlobalNameSpace = False
\r
80 Attribute VB_Creatable = False
\r
81 Attribute VB_PredeclaredId = True
\r
82 Attribute VB_Exposed = False
\r
85 Private Sub Print2(Texto As String)
\r
87 On Error GoTo Print2_Err
\r
89 Static Buffer As String
\r
91 txtResultado.Text = txtResultado.Text & Texto & vbNewLine
\r
92 txtResultado.SelStart = Len(txtResultado.Text)
\r
98 controlar_error Erl, Err.Description, "Analizador_Web.Principal.Print2"
\r
103 Public Sub controlar_error(algo, algo2, algo3)
\r
107 Private Sub cmdNavegar_Click()
\r
108 ie.Navigate txtAnalizar.Text
\r
111 Private Sub Form_Load()
\r
112 Caption = "Analizador Web V." & App.Major & "." & App.Minor & " para SVCommunty.org & TodoSV.com"
\r
113 ie.Navigate2 "sms.todosv.com"
\r
116 Private Sub Analizar()
\r
118 On Error GoTo Analizar_Err
\r
124 Dim iMaxForm As Integer
\r
125 Dim iMaxFra As Integer
\r
126 Dim iMaxCon As Integer
\r
127 Dim Buffer As String
\r
128 On Error Resume Next
\r
129 txtAnalizar.Text = ie.LocationURL
\r
131 'txtResultado.Text = vbNullString
\r
138 If ie.Document Is Nothing Then
\r
139 Print2 "Abortando analisis"
\r
144 105 iMaxFra = .Document.frames().length - 1
\r
145 106 Print2 "Página: " & ie.LocationURL
\r
146 107 Print2 "Titulo Página: " & ie.LocationName
\r
147 108 Print2 "Número de cuadros: " & iMaxFra + 1
\r
149 109 If iMaxFra <> -1 Then
\r
151 111 For i = 0 To iMaxFra
\r
152 112 Print2 "-Nombre de cuadro " & i & ": " & .Document.frames(i).Name & "(" & ie.Document.getElementsByTagName("frame").Item(i).GetAttribute("src") & ")"
\r
153 113 iMaxForm = .Document.frames(i).Document.Forms.length - 1
\r
154 114 Print2 "--No. formularios en cuadro " & i & ": " & iMaxForm + 1
\r
156 115 For a = 0 To iMaxForm
\r
157 116 iMaxCon = .Document.frames(i).Document.Forms(a).length - 1
\r
158 126 Print2 "--Controles en formulario " & a + 1 & ":"
\r
160 118 For e = 0 To iMaxCon
\r
161 119 Print2 "----Control " & i & "," & a & "," & e & " : " & .Document.frames(i).Document.Forms(a)(e).Value & " :: " & .Document.frames(i).Document.Forms(a)(e).Name
\r
167 121 iMaxForm = .Document.Forms.length - 1
\r
168 122 Print2 "-Numero de formularios: " & iMaxForm + 1
\r
170 123 If iMaxForm <> -1 Then
\r
172 124 For a = 0 To iMaxForm
\r
173 125 iMaxCon = .Document.Forms(a).length - 1
\r
174 1 Print2 "--Controles en formulario " & a + 1 & ":"
\r
176 127 For e = 0 To iMaxCon
\r
177 128 Print2 "---Control " & a & "," & e & " : " & .Document.Forms(a)(e).Value & " :: " & .Document.Forms(a)(e).Name
\r
182 129 Print2 "!!-> La pagina no tenía formularios"
\r
186 131 txtSalido.Text = .Document.documentelement.outerHTML
\r
192 controlar_error Erl, Err.Description, "Analizador_Web.Principal.Analizar.Ref 12/2/2008 : 10:18:10"
\r
197 Private Sub ie_BeforeNavigate2(ByVal pDisp As Object, _
\r
199 Flags As Variant, _
\r
200 TargetFrameName As Variant, _
\r
201 PostData As Variant, _
\r
202 Headers As Variant, _
\r
204 Dim sHeaders As String, sPostdata As String
\r
205 sHeaders = Replace$(StrConv(Headers, vbUnicode), Chr(0), vbNullString)
\r
206 sPostdata = Replace$(StrConv(PostData, vbUnicode), Chr(0), vbNullString)
\r
208 If Len(sHeaders) Or Len(sPostdata) Then
\r
209 Print2 "->" & Time$
\r
210 If Len(sHeaders) Then Print2 "HEADERS: " & sHeaders
\r
211 If Len(sPostdata) Then Print2 "POSTDATA: " & sPostdata
\r
216 Private Sub ie_DocumentComplete(ByVal pDisp As Object, URL As Variant)
\r
217 Print2 "<-" & Time$
\r